<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<h3 v-red>使用自定义指令改变颜色</h3>
		</div>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			Vue.directive('red', function(el) {
				this.el.style.color = "red"
			})
			var vm = new Vue({
				el: '#app',
				data: {
					
				}
			});
		</script>
	</body>
</html>
